﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Editor.ascx.cs" Inherits="UserInterface.UserControls.Editor" %>
<script src="JavaScript/bbcode.js" type="text/javascript"></script>
<table>
	<tr>
		<td>
			<input style="font-weight:bold;" type="button" onclick="bbcode.addTag('b')" value="B">
			<input style="font-style:italic; margin-left:5px;" type="button" onclick="bbcode.addTag('i')" value="I">
			<input style="text-decoration:underline; margin-left:5px;" type="button" onclick="bbcode.addTag('u')" value="U">
			<input style="margin-left:5px;" type="button" onclick="bbcode.addTag('img')" value="Img">
			<input style="margin-left:5px;" type="button" onclick="bbcode.addTag('url')" value="URL">
			<input style="margin-left:5px;" type="button" onclick="bbcode.addTag('quote')" value="Quote">
		</td>
		<td align="right">
			<a href="javascript:bbcode.closeAll()"><span class="small-text">Close All</span></a>
		</td>
	</tr>
	<tr>
		<td colspan="2" style="padding-top:2px; padding-bottom:2px;">
			Font color: 
			<select onchange="bbcode.addFontStyle('color', this.options[this.selectedIndex].value); this.selectedIndex=0;">
				<option>Default</option>
				<option style="color:black;" value="black">Black</option>
				<option style="color:darkred;" value="darkred">DarkRed</option>
				<option style="color:brown;" value="brown">Brown</option>
				<option style="color:darkgreen;" value="darkgreen">Dark Green</option>
				<option style="color:olive;" value="olive">Olive</option>
				<option	style="color:darkblue;" value="darkblue">Dark Blue</option>
				<option style="color:indigo;" value="indigo">Indigo</option>
				<option style="color:darkcyan;" value="darkcyan">Dark Cyan</option>
				<option style="color:gray;" value="gray">Gray</option>
				<option style="color:silver;" value="silver">Silver</option>
				<option style="color:red;" value="red">Red</option>
				<option style="color:orange;" value="orange">Orange</option>
				<option style="color:blue;" value="blue">Blue</option>
				<option	style="color:green;" value="green">Green</option>
				<option style="color:yellow;" value="yellow">Yellow</option>
				<option style="color:violet;" value="violet">Violet</option>
				<option style="color:cyan;" value="cyan">Cyan</option>
				<option style="color:white;" value="white">White</option>
			</select>
			&nbsp;Font size: 
			<select onchange="bbcode.addFontStyle('size', this.options[this.selectedIndex].value); this.selectedIndex=0;">
				<option>Default</option>
				<option value="7">Tiny</option>
				<option value="9">Small</option>
				<option value="12">Medium</option>
				<option value="18">Large</option>
				<option  value="24">Huge</option>
			</select>
		</td>
	</tr>
</table>

<asp:TextBox ID="MessageTextBox" runat="server" TextMode="MultiLine" Width="650" Height="300" />
				
<script type="text/javascript">
    bbcode = new BBCode(document.getElementById('<%= MessageTextBox.ClientID %>'));
</script>